//
//  QueryDiscountOperation.m
//  PlayBall
//
//  Created by Edward Zhang on 12-6-9.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import "JddQueryDiscountOperation.h"

@implementation JddQueryDiscountOperation

@synthesize lotteryTypeId;
@synthesize castTypeNo;
@synthesize moneyAmount;

- (void)main{
    JddNetDataCommunication *netDataCommunication = [[JddNetDataCommunication alloc] init];
    
    NSString *bodyString = [JddParameterBuilder queryDiscountOfTypeId:lotteryTypeId
                                                       moneyAmount:moneyAmount
                                                        castTypeNo:castTypeNo];
    
    NSData *dataLotteryIssue = [netDataCommunication requestDataByPostBodyData:[bodyString dataUsingEncoding:NSUTF8StringEncoding]];
    [((NSObject*)self.delegate) performSelectorOnMainThread:@selector(QueryDiscountOperationResult:) withObject:dataLotteryIssue waitUntilDone:NO];                
}

@end
